package auth

import (
	"GraduationProject/webserver/controllers/util"
	"github.com/gin-gonic/gin"
)

func UserInfo(ctx *gin.Context) {
	user, err := util.UserFilter(ctx)
	if err != nil {
		ctx.JSON(200, gin.H{
			"status":  10999,
			"message": "未知错误",
		})
		return
	}

	ctx.JSON(200, gin.H{
		"status":  10000,
		"message": "success",
		"user":    user,
	})
	return
}
